home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Light ROM Gold
/
Light ROM Gold.iso
/
arexx
/
save_pro.lwm
< prev
next >
Wrap
Text File
|
1993-02-12
|
2KB
|
72 lines
/* CMD: Save Project
*
* This is a Lightwave Modeler Macro that will save each layer as a
* different name so that when you want to work on the project again, it
* will load up into seperate layers again.
*
* 2/94 Jason Mussetter
*/
mxx="LWModelerARexx.port"
signal on error
signal on syntax
mxx_add = addlib(mxx,0)
call main
if (mxx_add) then call remlib(mxx)
exit
syntax:
error:
t=Notify(1,'Rexx Script Error','@'ErrorText(rc), 'Line 'SIGL)
if (mxx_add) then call remlib(mxx)
exit
main:
/* We'll ask the user for the Prefix of the Project's name. */
CALL REQ_BEGIN("Save Project")
Prj_Prfx = REQ_ADDCONTROL("Project Prefix", string, 50)
Num_Layr = REQ_ADDCONTROL("Number of Layers",number,0)
CALL REQ_POST()
If result = 0 then return
ProjectPrifix = REQ_GETVAL(Prj_Prfx)
LayerCount = REQ_GETVAL(Num_Layr)
CALL REQ_END()
Cont = NOTIFY(3,"All data is in consecutive layers","starting with 1?")
If result = 0 then return
/* After we have the Project's name prefix, we'll save each layer. */
CALL SETLAYER(1)
if LayerCount > 0 then CALL SAVE(ProjectPrifix||"1.lwob")
CALL SETLAYER(2)
if LayerCount > 1 then CALL SAVE(ProjectPrifix||"2.lwob")
CALL SETLAYER(3)
if LayerCount > 2 then CALL SAVE(ProjectPrifix||"3.lwob")
CALL SETLAYER(4)
if LayerCount > 3 then CALL SAVE(ProjectPrifix||"4.lwob")
CALL SETLAYER(5)
if LayerCount > 4 then CALL SAVE(ProjectPrifix||"5.lwob")
CALL SETLAYER(6)
if LayerCount > 5 then CALL SAVE(ProjectPrifix||"6.lwob")
CALL SETLAYER(7)
if LayerCount > 6 then CALL SAVE(ProjectPrifix||"7.lwob")
CALL SETLAYER(8)
if LayerCount > 7 then CALL SAVE(ProjectPrifix||"8.lwob")
return